package com.qf.service.impl;

import com.qf.entity.User;
import com.qf.entity.UserVO;
import com.qf.mapper.UserMapper;
import com.qf.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.HashMap;
import java.util.List;

/**
 * @author Qiao
 * @date 2025/8/11
 * @desc
 */
@Service
public class UserServiceImpl implements UserService {
    @Autowired
    private UserMapper userMapper;
    @Override
    public List<User> searchByMap(HashMap<String, String> map) {
        return userMapper.searchByMap(map);
    }

    @Override
    public void deleteBatch(List<Integer> ids) {
        userMapper.deleteBatch(ids);
    }

    @Override
    public boolean updateById(User user) {
        return userMapper.updateById(user);
    }

    @Override
    public UserVO findUserWithOrdersById(int id) {
        return userMapper.findUserWithOrdersById(id);
    }

    @Override
    public List<User> list() {
        return userMapper.list();
    }
}
